package com.xframe.domain.e3sp.basedata;

import com.xframe.domain.BaseModel;
import com.xframe.xdal.core.annotation.*;
import com.xframe.xdal.core.constant.AutoFillType;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @Description: DC
 * @ClassName: com.xframe.domain.e3sp.basedata.Dc
 * @Author: lmx
 * @CreateTime: 2024/01/02
 **/
@Data
@Accessors(chain=true)
@XTable(value = "p_t01_dc", label = "DC")
@XSelectItem(keyName = "dcId",codeName = "dc",textName = "nameCn")
@XSelectItem(keyName = "dcId",codeName = "dc",textName = "nameEn",language = "en")
@XBelongsTo(typeName = "com.xframe.domain.e3sp.basedata.PartClass",foreignKey = "classId", targetKey = "classId",as = "refPartClass")
@XBelongsTo(typeName = "com.xframe.domain.e3sp.basedata.Sc",foreignKey = "scId", targetKey = "scId",as = "refSc")
public class Dc extends BaseModel {
    /**
     * DC_ID
     */
    @AutoFill(AutoFillType.Snowflake)
    @XColumn(name = "dc_id", primaryKeyFlag = true,desc = "DCID")
    private Long dcId;

    /**
     * CLASSID
     */
    @XQueryCondition
    @XColumn(name = "class_id",desc = "CLASSID")
    private Long classId;

    /**
     * SCID
     */
    @XQueryCondition
    @XColumn(name = "sc_id",desc = "SCID")
    private Long scId;

    /**
     * DC
     */
    @XQueryCondition
    @XColumn(name = "dc", uniqueFlag = true,desc = "DC",length = 200)
    private String dc;


    /**
     * 中文名称
     */
    @XQueryCondition
    @XColumn(name = "name_cn",desc = "中文名称",length = 200)
    private String nameCn;

    /**
     * 英文名称
     */
    @XQueryCondition
    @XColumn(name = "name_en",desc = "英文名称",length = 200,nullFlag = true)
    private String nameEn;

    /**
     * 所属Sc
     */
    private Sc refSc;

    /**
     * 所属PartClass
     */
    private PartClass refPartClass;
}
